package com.io;

import java.io.*;
import java.text.Bidi;

/**
 * @author weijingchen
 * @DateTime 2025-06-17
 */
public class BufferedStreamTest {
    public static void main(String[] args) throws FileNotFoundException {


        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\test\\test.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("D:\\test\\test1.txt"));
        try(bis;bos) {
            byte[] bytes = new byte[1024];
            int read;
            while ((read = bis.read(bytes)) != -1){
                bos.write(bytes,0,read);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
